package com.spic.business.plan.drill.service.impl;

import java.util.List;
import com.spic.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.spic.business.plan.drill.mapper.PlanDrillProcessMapper;
import com.spic.business.plan.drill.domain.PlanDrillProcess;
import com.spic.business.plan.drill.service.IPlanDrillProcessService;

/**
 * 应急预案演练过程Service业务层处理
 * 
 * @author renxiang
 * @date 2021-10-31
 */
@Service
public class PlanDrillProcessServiceImpl implements IPlanDrillProcessService 
{
    @Autowired
    private PlanDrillProcessMapper planDrillProcessMapper;

    /**
     * 查询应急预案演练过程
     * 
     * @param id 应急预案演练过程主键
     * @return 应急预案演练过程
     */
    @Override
    public PlanDrillProcess selectPlanDrillProcessById(Long id)
    {
        return planDrillProcessMapper.selectPlanDrillProcessById(id);
    }

    /**
     * 查询应急预案演练过程列表
     * 
     * @param planDrillProcess 应急预案演练过程
     * @return 应急预案演练过程
     */
    @Override
    public List<PlanDrillProcess> selectPlanDrillProcessList(PlanDrillProcess planDrillProcess)
    {
        return planDrillProcessMapper.selectPlanDrillProcessList(planDrillProcess);
    }

    /**
     * 新增应急预案演练过程
     * 
     * @param planDrillProcess 应急预案演练过程
     * @return 结果
     */
    @Override
    public int insertPlanDrillProcess(PlanDrillProcess planDrillProcess)
    {
        planDrillProcess.setCreateTime(DateUtils.getNowDate());
        return planDrillProcessMapper.insertPlanDrillProcess(planDrillProcess);
    }

    /**
     * 修改应急预案演练过程
     * 
     * @param planDrillProcess 应急预案演练过程
     * @return 结果
     */
    @Override
    public int updatePlanDrillProcess(PlanDrillProcess planDrillProcess)
    {
        planDrillProcess.setUpdateTime(DateUtils.getNowDate());
        return planDrillProcessMapper.updatePlanDrillProcess(planDrillProcess);
    }

    /**
     * 批量删除应急预案演练过程
     * 
     * @param ids 需要删除的应急预案演练过程主键
     * @return 结果
     */
    @Override
    public int deletePlanDrillProcessByIds(Long[] ids)
    {
        return planDrillProcessMapper.deletePlanDrillProcessByIds(ids);
    }

    /**
     * 删除应急预案演练过程信息
     * 
     * @param id 应急预案演练过程主键
     * @return 结果
     */
    @Override
    public int deletePlanDrillProcessById(Long id)
    {
        return planDrillProcessMapper.deletePlanDrillProcessById(id);
    }
}
